const HtmlWebpackPlugin = require("html-webpack-plugin")

module.exports = {
    mode: "development",
    devServer: {
        proxy: {
            "/api": {
                target: "https://gitee.com",
                pathRewrite: {
                    '^/api': ""
                },
                changeOrigin: true
            }
        },
        open: true,
        hot: true,
        static: ["public"]
    },
    plugins: [new HtmlWebpackPlugin({
        title: "lx牛逼",
        meta: {
            viewport: "width=device-width"
        },
        filename: "index.html"
    })],
    devtool: "cheap-module-source-map"

}